package com.hdoit.ares.web.acc.modelconfig;

import com.hdoit.ares.web.acc.providers.CustomerDemoLevelProvider;
import com.tennetcn.component.attribute.DisplayNameAttribute;
import com.tennetcn.component.attribute.DropDownListAttribute;
import com.tennetcn.component.attribute.RequiredAttribute;
import com.tennetcn.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      yujinhui
 * @email       
 * @createtime  2017年11月29日 15:57:59
 * @comment
 */
public class CustomerDemoConfig extends ModelMetadataAttributeConfiguration{
    public CustomerDemoConfig(){
        this.setProperty("username")
            .hasAttribute(new DisplayNameAttribute("姓名"))
            .hasAttribute(new RequiredAttribute("姓名为必填项"));

        this.setProperty("registDate")
            .hasAttribute(new DisplayNameAttribute("注册时间"));


        this.setProperty("level")
            .hasAttribute(new DisplayNameAttribute("客户级别"))
            .hasAttribute(new RequiredAttribute("客户级别为必填项"))
            .hasAttribute(new DropDownListAttribute(new CustomerDemoLevelProvider()));

    }
}
